#include "Message.h"


//
// Initialize a new Message object with the given name. The userInfo map will
// default to empty(blank).
//
Message::Message(std::string name)
{
	_name = name;
	_userInfo = MessageUserInfo();
}


//
// Initialize a new Message object with the given name and userInfo map.
//
Message::Message(std::string name, MessageUserInfo userInfo)
{
	_name = name;
	_userInfo = userInfo;
}


//
// Create a copy of this Message object.
//
Message *Message::copy()
{
	return new Message(*this);
}


//
// Retrieve the name of this Message.
//
std::string Message::getName()
{
	return _name;
}


//
// Retrieve a reference to the userInfo map of this Message. If the user makes
// modifications to a message's userInfo it should reflect that in the Message.
//
MessageUserInfo &Message::getUserInfo()
{
	return _userInfo;
}

